using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;

using Castle.Model;
using Castle.MicroKernel;
using NBear.IoC.Service.Services.Configuration;
using NBear.Common;

namespace NBear.IoC.Service
{
    public interface IServiceContainer : IDisposable, ILogable
    {
        int MaxTryNum { get; set; }
        IKernel Kernel { get; }
        IServiceMQ MQ { get; }
        void RegisterComponent(string key, Type classType);
        void RegisterComponent(string key, Type serviceType, Type classType);
        void RegisterComponents(IDictionary serviceKeyTypes);
        void Release(object obj);
        object this[string Key] { get; }
        object this[Type serviceType] { get; }
        ResponseMessage CallService(string serviceName, RequestMessage msg);
        ServiceNodeInfo[] GetServiceNodes();
        ServiceNodeInfo[] GetDependerServiceNodes(string key);
        ServiceNodeInfo[] GetDependentServiceNodes(string key);
        void WriteLog(string logInfo);
    }
}
